<!DOCTYPE html>
<meta charset="utf-8">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src=helpers.js></script>
<script>
    "use strict";

    virtualAuthenticatorPromiseTest(async t => {
        const cred = await navigator.credentials.get({publicKey: {
            challenge: new Uint8Array(),
            allowCredentials: [{
                id: (await createCredential()).rawId,
                type: "public-key",
            }],
        }});
        return promise_rejects_dom(t, "NotSupportedError", navigator.credentials.store(cred));
    }, {}, "navigator.credentials.store() throws NotAllowedError with a public key credential");

</script>
